﻿<phone:PhoneApplicationPage 
    x:Class="PhoneAppCheckSensors.PageAccelerometer"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:mylib="clr-namespace:PhoneAppCheckSensors"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="696" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True">

    <!--LayoutRoot は、すべてのページ コンテンツが配置されるルート グリッドです-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel は、アプリケーション名とページ タイトルを格納します-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock x:Name="ApplicationTitle" Text="Sensors Sample" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock x:Name="PageTitle" Text="Accelerometer" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <!--ContentPanel - 追加コンテンツをここに入力します-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="128"/>
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="72"/>
                <RowDefinition Height="36"/>
                <RowDefinition Height="48"/>
                <RowDefinition Height="36"/>
                <RowDefinition Height="48"/>
                <RowDefinition Height="36"/>
                <RowDefinition Height="48"/>
                <RowDefinition Height="36"/>
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Orientation="Horizontal">
                <Button Content="Start" Name="buttonStart" Click="buttonStart_Click" />
                <Button Content="Stop" IsEnabled="False" Name="buttonStop" Click="buttonStop_Click" />
                <Button Content="Draw" IsEnabled="False" Name="buttonDraw" Click="buttonDraw_Click" />
            </StackPanel>
            <TextBlock Text="X" Grid.Row="1" VerticalAlignment="Center" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock Text="" Name="tbX" Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" Style="{StaticResource PhoneTextNormalStyle}"/>
            <mylib:GraphPart x:Name="gpX" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="2" AxisColor="White" DotColor="Magenta" VerticalLevel="0.5" UnitWidth="200000"/>
            <TextBlock Text="Y" Grid.Row="3" VerticalAlignment="Center" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock Text="" Name="tbY" Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" Style="{StaticResource PhoneTextNormalStyle}"/>
            <mylib:GraphPart x:Name="gpY" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="4" AxisColor="White" DotColor="YellowGreen" VerticalLevel="0.5" UnitWidth="200000"/>
            <TextBlock Text="Z" Grid.Row="5" VerticalAlignment="Center" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock Text="" Name="tbZ" Grid.Column="1" Grid.Row="5" VerticalAlignment="Center" Style="{StaticResource PhoneTextNormalStyle}"/>
            <mylib:GraphPart x:Name="gpZ" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="6" AxisColor="White" DotColor="Cyan" VerticalLevel="0.5" UnitWidth="200000"/>
            <TextBlock Text="Timestamp" Grid.Row="7" VerticalAlignment="Center" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock Text="" Name="tbTimestamp" Grid.Column="1" Grid.Row="7" VerticalAlignment="Center" Style="{StaticResource PhoneTextNormalStyle}"/>
        </Grid>
    </Grid>
 
    <!--ApplicationBar の使用法を示すサンプル コード-->
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True" Mode="Minimized">
            <shell:ApplicationBarIconButton IconUri="./appbar.feature.email.rest.png" Text="E-Mail" x:Name="buttonSend" IsEnabled="False" Click="ApplicationBarIconButtonSend_Click"/>
            <shell:ApplicationBarIconButton IconUri="./appbar.save.rest.png" Text="Save" IsEnabled="False" x:Name="buttonSave" Click="ApplicationBarIconButtonSave_Click"/>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage>
